1. Field of the Invention
The invention generally relates to initialization of a computer system. Specifically, the invention relates to an improved memory architecture for booting a computer system.
2. Description of the Related Art
Many modern electronic devices such as cell phones, PDAs, portable music players, appliances, and so on typically incorporate an embedded computer system. An embedded computer system typically contains a computer processor (referred to as a host), non-volatile memory (such as a flash memory and/or ROM memory), and volatile memory such as a dynamic random access memory (DRAM). The host may include a central processing unit (CPU), digital signal processor (DSP), microcontroller unit (MCU) or direct memory access (DMA) data transmission device.
During operation, a host typically runs an operating system or other operating code. Because volatile memory may typically be accessed more quickly than non-volatile memory, the operating code may be stored in the volatile memory and accessed from the volatile memory by the host. However, because volatile memory requires a power source to maintain data stored therein, when the embedded system is powered down, the volatile memory is typically erased. Accordingly, when the embedded system is powered up (e.g., when the embedded system enters a reset state), the operating code required by the host system is typically loaded into the volatile memory. Typically, the operating code is loaded from the nonvolatile memory (e.g., a ROM and/or flash memory) which retains stored data even when the embedded system is not being powered. The process of loading code stored in non-volatile memory into volatile memory and executing the code from volatile memory may be referred to as code shadowing.
When the embedded system is powered up, the embedded system typically performs a boot sequence to properly load the operating code from the nonvolatile memory to the volatile memory and initialize the host with the operating code. In order to perform the boot sequence, the host typically accesses boot code which is stored in a predefined area of non-volatile memory. The boot code is simple code which may be executed by the host, enabling the host to perform more complicated actions required to load the operating code into volatile memory and begin execution of the operating code.
In some cases, the host may transfer the operating code from the nonvolatile memory to the volatile memory using direct memory access (DMA). DMA allows a portion of memory to be quickly and automatically moved from one storage location to another storage location. To perform the DMA transfer, the host may need to initialize the DMA engine. In some cases, the DMA engine may be located in the host. To initialize the DMA engine, the host may use information and/or instructions provided by the boot code. Once the DMA engine is initialized, the host may issue commands to the DMA engine to load operating code from the non-volatile memory into the volatile memory. The host may then begin executing the operating code and any other code necessary for proper operation of the host.
Booting an embedded system as described above may require a variety of special configurations for the host. For example, the host typically requires multiple interfaces configured to interface multiple types of memory (Flash, ROM, and DRAM types of memory). The host is also typically configured to automatically load the boot code, load controller code for an embedded microcontroller, and provide capabilities for initializing and managing DMA transfers from the non-volatile memory to the volatile memory as a part of the boot sequence. Such special configurations required by the host for booting the embedded system typically reduce flexibility and increase design costs of the host and the embedded system.
Accordingly, what is needed is an improved system and method for booting an embedded system.